package com.lmm.lcbusiness.lcbusiness.pages.rnpages.plugins;

import com.facebook.react.bridge.Callback;
import com.lmm.dresswisdom.lmmframe.reactnative.BasePlugin;
import com.lmm.dresswisdom.lmmframe.reactnative.annotation.RNPlugin;
import com.lmm.dresswisdom.lmmframe.util.ToastUtils;
import com.lmm.lcbusiness.lcbusiness.pages.rnpages.ReactNativeActivity;

import java.util.Map;

/**
 * @author xmgong
 * @date 2017/11/30
 */
@RNPlugin(method = "showinfo")
public class ShowInfoPlugin extends BasePlugin<ReactNativeActivity> {
    public ShowInfoPlugin(ReactNativeActivity act) {
        super(act);
    }

    @Override
    protected void doAction(Map<String, Object> map, Callback callback) {
        String info = map.get("info").toString();
        ToastUtils.showToastShort(info);
    }
}
